const BASE_URL = 'https://ca.wupin.shop'
export const myRequest = (options)=>{
	return new Promise((resolve,reject)=>{
		uni.request({
			url:BASE_URL+options.url,
			method:options.method || 'GET',
			data:options.data || {},
			params:options.params || {},
			header: {
				openid:uni.getStorageSync('openid'),
				"Content-Type":'application/json',
				Charset:'UTF-8'
				},/* 请求头携带openid */
			success: (res) => {
				resolve(res)
			},
			fail: (err) => {
				uni.showToast({
					title:'请求接口失败'
				})
				reject(err)
			}
		})
	})
}